home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / WIN_VB / STMOUS.ZIP;1 / GENERAPP.FRM (.txt) next >
Encoding:
Visual Basic Form  |  1993-10-12  |  9.7 KB  |  279 lines

  1. VERSION 2.00
  2. Begin Form Balloon_Form 
  3.    Caption         =   "STMOUSE Help"
  4.    ClientHeight    =   5325
  5.    ClientLeft      =   1140
  6.    ClientTop       =   1035
  7.    ClientWidth     =   5085
  8.    ClipControls    =   0   'False
  9.    Height          =   6015
  10.    Left            =   1080
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   5325
  13.    ScaleWidth      =   5085
  14.    Top             =   405
  15.    Width           =   5205
  16.    Begin StMouse StMouse1 
  17.       Left            =   2400
  18.       Top             =   3480
  19.    End
  20.    Begin CommandButton BTN_STMouseStop 
  21.       Caption         =   "Stop STM"
  22.       Height          =   375
  23.       Left            =   1920
  24.       TabIndex        =   15
  25.       Top             =   720
  26.       Width           =   1215
  27.    End
  28.    Begin CommandButton BTN_STMouseStart 
  29.       Caption         =   "Start STM"
  30.       Height          =   375
  31.       Left            =   240
  32.       TabIndex        =   14
  33.       Top             =   720
  34.       Width           =   1215
  35.    End
  36.    Begin ComboBox Combo1 
  37.       Height          =   300
  38.       Left            =   240
  39.       TabIndex        =   13
  40.       Text            =   "Combo1"
  41.       Top             =   2880
  42.       Width           =   2175
  43.    End
  44.    Begin OptionButton Option3 
  45.       Caption         =   "Maybe option"
  46.       Height          =   255
  47.       Left            =   1200
  48.       TabIndex        =   12
  49.       Top             =   4320
  50.       Width           =   1575
  51.    End
  52.    Begin PictureBox Picture1 
  53.       AutoSize        =   -1  'True
  54.       ClipControls    =   0   'False
  55.       Height          =   360
  56.       Left            =   360
  57.       Picture         =   GENERAPP.FRX:0000
  58.       ScaleHeight     =   330
  59.       ScaleWidth      =   360
  60.       TabIndex        =   11
  61.       Top             =   3600
  62.       Width           =   390
  63.    End
  64.    Begin CheckBox Check2 
  65.       Caption         =   "That"
  66.       Height          =   255
  67.       Left            =   1200
  68.       TabIndex        =   10
  69.       Top             =   3840
  70.       Width           =   1200
  71.    End
  72.    Begin CheckBox Check1 
  73.       Caption         =   "This"
  74.       Height          =   255
  75.       Left            =   1200
  76.       TabIndex        =   9
  77.       Top             =   3360
  78.       Width           =   1200
  79.    End
  80.    Begin Frame Frame1 
  81.       Caption         =   "Do it now"
  82.       Height          =   1215
  83.       Left            =   3000
  84.       TabIndex        =   6
  85.       Top             =   3120
  86.       Width           =   1695
  87.       Begin OptionButton Option2 
  88.          Caption         =   "No"
  89.          Height          =   255
  90.          Left            =   240
  91.          TabIndex        =   8
  92.          Top             =   720
  93.          Width           =   1000
  94.       End
  95.       Begin OptionButton Option1 
  96.          Caption         =   "Yes"
  97.          Height          =   255
  98.          Left            =   240
  99.          TabIndex        =   7
  100.          Top             =   360
  101.          Width           =   1000
  102.       End
  103.    End
  104.    Begin TextBox TXT_Result 
  105.       Height          =   375
  106.       Left            =   120
  107.       TabIndex        =   5
  108.       Text            =   "Status output"
  109.       Top             =   4800
  110.       Width           =   4815
  111.    End
  112.    Begin TextBox TXT_KeyString 
  113.       Height          =   375
  114.       Left            =   120
  115.       TabIndex        =   2
  116.       Text            =   "This is a popup message to display in the window. The message can be of long length, or it can be short."
  117.       Top             =   1560
  118.       Width           =   4815
  119.    End
  120.    Begin CommandButton BTN_Exit 
  121.       Caption         =   "Exit"
  122.       Height          =   375
  123.       Left            =   3600
  124.       TabIndex        =   1
  125.       Top             =   720
  126.       Width           =   1215
  127.    End
  128.    Begin TextBox TXT_SearchString 
  129.       Height          =   375
  130.       Left            =   120
  131.       TabIndex        =   0
  132.       Text            =   "Dawg"
  133.       Top             =   2280
  134.       Width           =   4815
  135.    End
  136.    Begin Label Label2 
  137.       Alignment       =   2  'Center
  138.       Caption         =   "Click ""Start STM"" and move mouse over a control to display the status line help text for."
  139.       Height          =   375
  140.       Left            =   240
  141.       TabIndex        =   16
  142.       Top             =   120
  143.       Width           =   4575
  144.    End
  145.    Begin Label Label3 
  146.       Alignment       =   2  'Center
  147.       Caption         =   "Search String"
  148.       Height          =   255
  149.       Left            =   120
  150.       TabIndex        =   4
  151.       Top             =   2040
  152.       Width           =   4815
  153.    End
  154.    Begin Label Label1 
  155.       Alignment       =   2  'Center
  156.       Caption         =   "Key String"
  157.       Height          =   255
  158.       Left            =   120
  159.       TabIndex        =   3
  160.       Top             =   1320
  161.       Width           =   4815
  162.    End
  163.    Begin Menu nmu_File 
  164.       Caption         =   "&File"
  165.       Begin Menu mnu_Exit 
  166.          Caption         =   "&Exit"
  167.       End
  168.    End
  169.    Begin Menu mnu_Edit 
  170.       Caption         =   "&Edit"
  171.       Begin Menu mnu_Cut 
  172.          Caption         =   "Cu&t"
  173.       End
  174.       Begin Menu mnu_Copy 
  175.          Caption         =   "&Copy"
  176.       End
  177.       Begin Menu mnu_Paste 
  178.          Caption         =   "&Paste"
  179.       End
  180.       Begin Menu mnu_submenu 
  181.          Caption         =   "SubMenu"
  182.          Begin Menu mnu_submenu1 
  183.             Caption         =   "SubMenu 1"
  184.          End
  185.          Begin Menu mnu_submenu2 
  186.             Caption         =   "SubMenu 2"
  187.          End
  188.       End
  189.    End
  190.    Begin Menu mnu_help 
  191.       Caption         =   "&Help"
  192.       Begin Menu mnu_HelpBalloons 
  193.          Caption         =   "Help &Balloons"
  194.       End
  195.    End
  196. Option Explicit
  197. ' Declare statements for utility functions included in STMOUSE.VBX
  198. Declare Function Hwnd2ControlTabIndex Lib "STMOUSE.VBX" (ByVal hwndControl%) As Integer
  199. Declare Function Hwnd2CtlName Lib "STMOUSE.VBX" (ByVal hwndControl%) As String
  200. Declare Function Hwnd2HelpContextID Lib "STMOUSE.VBX" (ByVal hwndControl%) As Long
  201. Declare Function Hwnd2TagText Lib "STMOUSE.VBX" (ByVal hwndControl%) As String
  202. Sub BTN_Exit_Click ()
  203.     mnu_Exit_Click
  204. End Sub
  205. Sub BTN_STMouseStart_Click ()
  206.     STMouse1.Action = 60 'start
  207. End Sub
  208. Sub BTN_STMouseStop_Click ()
  209.     STMouse1.Action = 61 ' stop
  210. End Sub
  211. Sub Form_Resize ()
  212.     If Me.WindowState = 0 Then
  213.         Me.Height = 6015
  214.         Me.Width = 5175
  215.     End If
  216.     Me.Top = 0
  217.     Me.Left = 0
  218. End Sub
  219. Sub mnu_Exit_Click ()
  220.     End
  221. End Sub
  222. Sub mnu_HelpBalloons_Click ()
  223.     ' initial help text string
  224.     ' here we get the text from the on screen text box
  225.     '
  226.     ' Initial text can be left blank, if blank then
  227.     ' Balloon.vbx control will display an internal init message
  228.     TXT_Result.Text = TXT_KeyString.Text
  229.     STMouse1.Action = 20     ' Balloon_START = 20
  230. End Sub
  231. Sub StMouse1_StMouseClick (hwndAtMouse As Integer)
  232. ' PURPOSE:  hwndAtMouse is the control the mouse is over
  233. ' COMMENTS: pass back the help text
  234. '           shows how to programmatcially end a session
  235. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  236. Dim Msg As String
  237. Dim CRLF As String
  238.     CRLF = Chr$(13) + Chr$(10)
  239.     ' use utility routines to retieve help text from properties
  240.     TXT_Result.Text = Hwnd2CtlName(hwndAtMouse) + " ... hwndAtMouse = " + Hex$(hwndAtMouse)
  241.     Exit Sub
  242.     '' Use the following alternate technique to place text
  243.     Select Case hwndAtMouse
  244.         Case Me.hWnd
  245.             Exit Sub    ' do nothing
  246.         Case BTN_StMouseStart.hWnd
  247.             TXT_Result.Text = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control BTN_STMouseStart."
  248.         Case BTN_STMouseStop.hWnd
  249.             TXT_Result.Text = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control BTN_STMouseStop."
  250.         Case BTN_Exit.hWnd
  251.             TXT_Result.Text = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control BTN_Exit."
  252.         Case TXT_KeyString.hWnd
  253.             TXT_Result.Text = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control TXT_KeyString."
  254.         Case TXT_SearchString.hWnd
  255.             TXT_Result.Text = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control TXT_SearchString."
  256.         Case TXT_Result.hWnd
  257.             TXT_Result.Text = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control TXT_Result."
  258.         Case Picture1.hWnd
  259.             TXT_Result.Text = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control Picture1."
  260.         Case Check1.hWnd
  261.             TXT_Result.Text = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control Check1."
  262.         Case Check2.hWnd
  263.             TXT_Result.Text = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control Check2."
  264.         Case Frame1.hWnd
  265.             TXT_Result.Text = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control Frame1."
  266.         Case Option1.hWnd
  267.             TXT_Result.Text = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control Option1."
  268.         Case Option2.hWnd
  269.             TXT_Result.Text = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control Option2."
  270.         Case Option3.hWnd
  271.             TXT_Result.Text = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control Option3."
  272.         Case Combo1.hWnd
  273.             TXT_Result.Text = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control Combo1."
  274.         Case Else
  275.         
  276.         End Select
  277.         
  278. End Sub
  279.